﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="detail.aspx.cs" Inherits="ProjectX.detail" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>购买明细</title>
    <link type="text/css" href="/WebCss/base.css" rel="stylesheet" />
    <link type="text/css" href="/WebCss/detail.css" rel="stylesheet" />	
    <link type="text/css" href="/WebCss/skins/Ext/asyncbox.css" rel="stylesheet"  />
    <script type="text/javascript" src="/ClientJs/jquery.js" ></script>
    <script type="text/javascript" src="/ClientJs/jquery.loadthumb.js"></script>
    <script type="text/javascript" src="/ClientJs/AsyncBox.js" ></script>
    <script type="text/javascript" src="/ClientJs/detail.js"></script>
</head>
<body>
<form runat="server">
    <input type="hidden" id="userSession" value="<%= Session["userNick"] %>" />
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    
    <div id="headTop">
        <p>
            <asp:HyperLink ID="username" runat="server" NavigateUrl="/userCenter.html" ForeColor="Red"></asp:HyperLink>&nbsp&nbsp&nbsp欢迎来到淘我想淘网！
            <strong>
                <asp:HyperLink ID="loginlink" runat="server" NavigateUrl="/login.html" ForeColor="White">[请登录]</asp:HyperLink>&nbsp<font color="red">|</font>&nbsp<asp:HyperLink ID="reglink" runat="server" NavigateUrl="/regedit.html" ForeColor="White">[免费注册]</asp:HyperLink>
                <asp:LinkButton ID="logout" runat="server" ForeColor="White" 
                Visible="false" onclick="logout_Click">[退出]</asp:LinkButton>
            </strong>
            <span>
                <a href="/userCenter.html" target="_self" style="color:White">[用户中心]</a>&nbsp<font color="red">|</font>&nbsp[帮助中心]
            </span>
        </p>
    </div>
    <div id="newHeader" >
        <div>
            <a href="/" class="logo hidetxt"></a>
        </div>
        <ul id="newNav">
            <li><a id="mainpage" href="/" target="_parent" class="mainlink"></a></li>
            <li><a id="buy" href="/buy.html" target="_parent" class="buylink"></a></li>
            <li><a id="mybuy" href="/mybuy.html"  target="_parent" class="mybuylink"></a></li>
            <li><a id="allbuy" href="/allbuy.html"  target="_parent" class="allbuylink"></a></li>
        </ul>
    </div>

    <div id="main">
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>
                <asp:ListView ID="myDetails" runat="server" 
                    onitemcommand="myDetails_ItemCommand" 
                    onitemdatabound="myDetails_ItemDataBound">
                    <LayoutTemplate>
                        <div>
                            <div id="itemPlaceholder" runat="server"></div>
                        </div>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <asp:HiddenField ID="ReleaseName" runat="server" Value=<%# Eval("ReleaseName")%> />
                        <asp:HiddenField ID="buyid" runat="server" Value=<%# Eval("Id")%> />
                        <asp:HiddenField ID="Status" runat="server" Value=<%# Eval("Status")%> />
                        <asp:HiddenField ID="title" runat="server" Value=<%# Eval("Title")%> />
                        <div class="title"><h2><%# Eval("Title") %></h2></div>
                        <div>
                            <div id="imgdiv">
                                <img id="myImgs" src='<%# Eval("imgsrc").ToString().Trim()==""?"/images/webkey_1_009.png":Eval("imgsrc") %>' style="display:none;" alt="" />
                            </div>
                            <div id="infordiv">
						        <div style="text-align:left;height:200px;">
                                    <div style="float:left">
							            <dl style="width:350px;height:200px;">
								            <dt>期望价格：</dt>
								            <dd><span class="price"><%# Eval("ExpectpricesMax")%></span>元</dd>
								            <dt>宝贝名称：</dt>
								            <dd><%# Eval("name") %></dd>
								            <dt>发布人：</dt>
								            <dd><%# Eval("ReleaseName")%></dd>
								            <dt>发布时间：</dt>
								            <dd><%# Eval("Starttime", "{0:yyyy-MM-dd HH:mm:ss}")%></dd>
								            <dt>购买数量：</dt>
								            <dd style="color:#FF8000"><%# Eval("Count") %></dd>
								            <dt>购买地区：</dt>
								            <dd><%# Eval("Province").ToString().Trim() == "" ? "随便那里都可以" : Eval("Province").ToString() +"  "+ Eval("City").ToString()%></dd>
								            <dt>其他：</dt>
								            <dd><span><%# Eval("Keyprop") %></span>&nbsp&nbsp&nbsp&nbsp<span>送给<%# Eval("Owner") %></span></dd>
							            </dl>
                                    </div>
                                    <div class="sellercount">
                                        <div class="clearfix cornerFixTop cornerBorder" style="overflow:hidden;padding-top:8px;">
                                            <div id="buydiv" class="buyer">淘友情况</div>
                                            <div class="honer"></div>
                                            <div id="selldiv" class="seller">卖家情况</div>
                                        </div>
                                        <div class="bscontent cornerFixBottom">
                                            <div id="buyinfor">
                                                <span class="sellspan"><h2 style="color:#FF8000"><%# Eval("Respondcount").ToString().Trim()%></h2>位淘友有兴趣</span>
                                                <div style="height:70px;width:100%;">
                                                    <asp:LinkButton class="btnclass btn_add" ID="addbuy" runat="server" CommandName="addbuy" CommandArgument='<%# Eval("Id") %>'>我要加入</asp:LinkButton>
                                                    <asp:LinkButton class="btnclass btn_close" Visible="false" ID="closebuy" runat="server" CommandName="closebuy" CommandArgument='<%# Eval("Id") %>'>关闭购买</asp:LinkButton>
                                                    <asp:Panel ID="closedPanel" runat="server" CssClass="btnclass closedpanel" Visible="false">
                                                        已关闭
                                                    </asp:Panel>
                                                </div>
                                            </div>
                                            <div id="sellinfor" class="hideinfor">
                                                <span class="sellspan"><h2 style="color:#3396e4"><%# Eval("SellerCount").ToString().Trim()%></h2>位卖家提供商品</span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="clearfix"></div>
                            <div>
					            <div class="information">
                                    <%# Eval("Information").ToString().Trim() %>
                                </div>
                            </div>
                        </div>
                    </ItemTemplate>
                    <EmptyDataTemplate>
                        <div class="wp">
                            <div id="cnt" class="c12">
                                <div class="try">
                                    <p>您可以选择访问：</p>
                                    <ul>
                                        <li><a href="/">网站首页</a></li>
                                        <li><a href="/allbuy.html">所有购买</a></li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </EmptyDataTemplate>
                </asp:ListView>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="myDetails" EventName="ItemCommand" />
            </Triggers>
        </asp:UpdatePanel>
        <asp:Panel ID="Sellpanel" runat="server" CssClass="sellerinfor">
            <asp:Panel ID="titlePanel" runat="server" HorizontalAlign="Left">
                <ul style="border-bottom: 2px solid #5CB7E5;">
                    <li class="selltitle">
                        <img src="/Webimg/seller.png" alt="" style="vertical-align:middle" />
                    </li>
                </ul>
            </asp:Panel>
            <asp:Panel ID="bodyPanel" runat="server" CssClass="bodypanel">
                <div class="emptycss">
                    <span><a href="javascript:userLogin()"><strong>登录</strong></a>并加入购买后可查看所有卖家提供的商品。</span>
                </div>
            </asp:Panel>
            <asp:Panel ID="bodyPanel1" runat="server" CssClass="bodypanel" Visible="false">
                <div class="emptycss">
                    <span>加入购买后可查看所有卖家提供的商品。</span>
                </div>
            </asp:Panel>

            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <asp:Panel ID="sortPanel" runat="server" CssClass="sortcss" Visible="False">
                        <span style="float:left; margin-right:5px;">排序：</span>
                        <asp:Label ID="sortspan" runat="server" CssClass="sortspan" Text="价格由低到高"></asp:Label>
                        <div class="clearfix"></div>
                        <ul id="sortul">
                            <li><asp:LinkButton ID="priceasc" CssClass="by-price-asc" runat="server" onclick="priceasc_Click">价格由低到高</asp:LinkButton></li>
                            <li><asp:LinkButton ID="pricedesc" CssClass="by-price-desc" runat="server" 
                                    onclick="pricedesc_Click">价格由高到低</asp:LinkButton></li>
                            <li><asp:LinkButton ID="honordesc" CssClass="by-credit-desc" runat="server" 
                                    onclick="honordesc_Click">卖家信誉由高到低</asp:LinkButton></li>
                            <li><asp:LinkButton ID="countdesc" CssClass="by-sale-desc" runat="server" 
                                    onclick="countdesc_Click">浏览次数由高到低</asp:LinkButton></li>
                        </ul>
                    </asp:Panel>
                    <asp:GridView ID="SellView" runat="server" 
                        EnableModelValidation="True" AutoGenerateColumns="False" GridLines="None" 
                        ShowHeader="False">
                        <Columns>
                            <asp:TemplateField> 
                                <ItemTemplate>
                                    <div id="imgparent">
                                        <asp:Image ID="Sellimg" CssClass="imgcss tip" runat="server" ImageUrl='<%# Eval("Piclink").ToString().Trim()==""?"images/webkey_1_009.png":Eval("Piclink") %>' />
                                    </div>
                                </ItemTemplate>
                                <ItemStyle Width="130px" CssClass="rowcss" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div style="height:40px;">
                                        <div class="fontbreak">
                                            <a href="/Jump/<%# Eval("Id") %>.html" target="_blank">
                                                <span><%# Eval("Infomation").ToString().Trim().Length >= 180 ? Eval("Infomation").ToString().Trim().Substring(0, 175) + "..." : Eval("Infomation").ToString().Trim() %></span>
                                            </a>
                                        </div>
                                    </div>
                                    <div>
                                        <ul>
                                            <li class="licss">
                                                <span class="sellerdetil">
                                                    价格：
                                                    <span class="fontcolor">
                                                        <strong>￥<%# Eval("Price", "{0:f2}").Trim() == "" ? "0.00" : Eval("Price", "{0:f2}").Trim()%></strong></span></span><div class="clearfix"></div>
                                            </li>
                                            <li class="licss">
                                                <span class="sellerdetil">卖家信誉：
                                                    <img src="/Webimg/topsorce/<%# int.Parse(Eval("Honor").ToString())<= 0 ? 1 : Eval("Honor") %>.gif" alt="" style="vertical-align:middle;" />
                                                </span>
                                                <span class="sellerdetil">地区：
                                                    <span class="fontcolor">
                                                        <strong><%# Eval("State") %>&nbsp;&nbsp;&nbsp;<%# Eval("City") %></strong></span></span></li>
                                        </ul>
                                    </div>
                                </ItemTemplate>
                                <ItemStyle Width="580px" HorizontalAlign="Left" VerticalAlign="Top" 
                                    CssClass="contentd rowcss" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div style="height:100px;text-align:center;line-height:100px;">
                                        <label title="浏览次数" style="color:#666;">
                                            浏览<strong style="color:#3396E4"><%# Eval("count")%></strong>次
                                        </label> 
                                    </div>
                                </ItemTemplate>
                            <ItemStyle Width="120px" CssClass="contentd rowcss" HorizontalAlign="Left" />
                            </asp:TemplateField>


                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div style="height:30px;">
                                        <h4 style="color:#3396e4;"><%# Eval("ReleaseName")%></h4>
                                    </div>
                                    <div style="margin-bottom:10px;">
                                        <span style="color:#3396e4;"><%# Eval("Releasetime").ToString()%></span>
                                    </div>
                                    <a href="/Jump/<%# Eval("Id") %>.html" target="_blank"><img src="/Webimg/buybtn.png" alt="" /></a>
                                </ItemTemplate>
                                <ItemStyle VerticalAlign="Bottom" HorizontalAlign="right" CssClass="linktd rowcss" Width="150px" />
                            </asp:TemplateField>
                        </Columns>
                        <EmptyDataTemplate>
                            <div  class="emptycss">
                                <span>暂无卖家提供商品</span>
                            </div>
                        </EmptyDataTemplate>
                        <RowStyle CssClass="rowbackcolor" />
                    </asp:GridView>
                    <webdiyer:aspnetpager id="AspNetPager" runat="server" HorizontalAlign="Center"
                    Width="100%" CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页" CustomInfoTextAlign="Left" 
                    Direction="LeftToRight" FirstPageText="首页" LastPageText="尾页" LayoutType="Div" 
                    NextPageText="下一页" PageIndexBoxType="TextBox" PrevPageText="上一页" 
                    ShowPageIndexBox="Never" PageSize="7" onpagechanged="AspNetPager_PageChanged" ShowNavigationToolTip="True" 
                    EnableTheming="False" NumericButtonCount="6" AlwaysShow="True" 
                        CssClass="pagercss" CurrentPageButtonPosition="Center" UrlPageIndexName="currpage" 
                        Wrap="False" CurrentPageButtonClass="currentpage" UrlPaging="False" 
                        Visible="False"></webdiyer:aspnetpager>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="AspNetPager" EventName="PageChanged" />
                    <asp:AsyncPostBackTrigger ControlID="priceasc" EventName="Click" />
                    <asp:AsyncPostBackTrigger ControlID="countdesc" EventName="Click" />
                    <asp:AsyncPostBackTrigger ControlID="honordesc" EventName="Click" />
                    <asp:AsyncPostBackTrigger ControlID="pricedesc" EventName="Click" />
                </Triggers>
            </asp:UpdatePanel>
            <script type="text/javascript">
                Sys.Application.add_load(function () {
                    var form = Sys.WebForms.PageRequestManager.getInstance()._form;
                    form._initialAction = form.action = window.location.href;
                }); 
            </script>
        </asp:Panel>
    </div>
    <iframe id="Ifooter" style="border: none;margin-top:30px;margin-bottom:30px;" width="998px" height="250px" src="/footer.aspx" scrolling="no"></iframe>
</form>
</body>
</html>

